package com.yjd.comm.zhima.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.zhima.model.ZhimaCreditDataModel;
import com.yjd.comm.zhima.model.ZhimaCreditModel;

/**
 * <b>description</b>：芝麻信用授权表业务接口<br>
 * <b>time</b>：2017-08-21 16:00:12 <br>
 * <b>author</b>：  carl
 */
public interface IZhimaCreditService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public ZhimaCreditModel insert(ZhimaCreditModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(ZhimaCreditModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param user_id
	 * @return
	 * @throws Exception
	 */
	public int delete(long user_id) throws Exception;


	/**
	 * 芝麻信用授权申请
	 * @param user_id
	 * @return
	 * @throws Exception
	 */
	public ZhimaCreditModel authApply(Long user_id)throws Exception;

	/**
	 * 获取芝麻信用数据
	 * @param user_id
	 * @return
	 * @throws Exception
	 */
	public ZhimaCreditDataModel zhimaData(Long user_id)throws Exception;

	/**
	 * 芝麻授权回调信息
	 * @param user_id
	 * @param message
	 * @throws Exception
	 */
	public void authCallBack(Long user_id,String message)throws Exception;

}
